From: Stefan Monnier Date: Wed, 12 Oct 2011 19:08:04 +0000 (-0400) Subject: * doc.c (get_doc_string): Encode file name. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~1976 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=40babedafdfeebcd5f09942ba6e7ffb15d5147ed;p=emacs.git * doc.c (get_doc_string): Encode file name. --- diff --git a/src/ChangeLog b/src/ChangeLog index 6931610cda8..36a6f23ccab 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-10-12 Stefan Monnier + + * doc.c (get_doc_string): Encode file name (bug#9735). + 2011-10-12 Eli Zaretskii * bidi.c (bidi_level_of_next_char): diff --git a/src/doc.c b/src/doc.c index 83e943c42b8..80aaba9f7b2 100644 --- a/src/doc.c +++ b/src/doc.c @@ -116,14 +116,16 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) If it is relative, combine it with Vdoc_directory. */ tem = Ffile_name_absolute_p (file); + file = ENCODE_FILE (file); if (NILP (tem)) { - minsize = SCHARS (Vdoc_directory); + Lisp_Object docdir = ENCODE_FILE (Vdoc_directory); + minsize = SCHARS (docdir); /* sizeof ("../etc/") == 8 */ if (minsize < 8) minsize = 8; name = (char *) alloca (minsize + SCHARS (file) + 8); - strcpy (name, SSDATA (Vdoc_directory)); + strcpy (name, SSDATA (docdir)); strcat (name, SSDATA (file)); } else @@ -138,7 +140,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition) if (!NILP (Vpurify_flag)) { /* Preparing to dump; DOC file is probably not installed. - So check in ../etc. */ + So check in ../etc. */ strcpy (name, "../etc/"); strcat (name, SSDATA (file));